#ifndef _SHOWLYRICDLG_H_
#define _SHOWLYRICDLG_H_
	void SmartShowWnd(gboolean bShow);
	void ClearLyric();
	void LyricWndInit();
	void ShowLyric();
	int _GetTime(gchar* lpszTime);
	void _ParseLine(int iTime, gchar* lpszValue);
	gboolean ParseLyric(gchar* lpszLyricFileName);
	void on_MenuReDownLoad_activate(GtkWidget* wideget, gpointer user_data);
	void on_MenuDownTime_activate(GtkWidget* wideget, gpointer user_data);
	void on_MenuUpTime_activate(GtkWidget* wideget, gpointer user_data);
	void on_MenuMouseScroll_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data);
	void on_MenuShowBroad_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data);
	void on_MenuConfig_activate(GtkWidget* wideget, gpointer user_data);
	void on_MenuEditLyric_activate(GtkWidget* wideget, gpointer user_data);
	gboolean on_ShowLyric_motion_notify_event(GtkWidget *widget, GdkEventMotion *event, gpointer user_data);
	gboolean on_ShowLyric_scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_data);
	gboolean on_ShowLyric_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
	void on_MenuShowOSD_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data);
	void on_MenuKaLaOK_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data);
	void on_MenuManualDownLoad_activate(GtkWidget* wideget, gpointer user_data);
	inline gboolean IsSmaller(int *piNew);
	void color_between(GdkColor * from, GdkColor * to, gdouble rate, GdkColor * result);
	inline gint number_between(gint from, gint to, gdouble rate);
	void on_MenuAbout_activate(GtkWidget* wideget, gpointer user_data);
	gboolean on_ShowLyric_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
	void on_ShowLyric_window_state_event(gpointer data);
	void RefreshLyricSetting();
	void OnShowState(const gchar * format, ...);



#define BEGIN_SHOW_LYRIC(FONTSIZE, WIDTH, HEIGH, COLOR, FONT)	{cairo_t *cr;\
									cr = gdk_cairo_create (theApp.m_LyricWnd.pThis->window);\
									cairo_select_font_face (cr, FONT,\
												CAIRO_FONT_SLANT_NORMAL,\
												CAIRO_FONT_WEIGHT_NORMAL);\
									cairo_set_font_size (cr, FONTSIZE);\
									gdk_cairo_set_source_color(cr, &COLOR);\
									cairo_rectangle (cr, 0, 0, WIDTH, HEIGH);\
									cairo_fill (cr);
#define SHOW_LYRIC(WIDTH, Y, VALUE, COLOR)	{\
											gdk_cairo_set_source_color(cr, &COLOR);\
											cairo_move_to (cr, (WIDTH - GetTextWidth(VALUE, NULL, iFontSize)) / 2, Y);\
											cairo_show_text (cr, VALUE);\
										}
#define END_SHOW_LYRIC()	cairo_destroy (cr);}
#endif
